/**
 * 路由模块
 */
import { createRouter, createWebHashHistory } from 'vue-router'
import AppLayout from '../layout/AppLayout.vue'

const router = createRouter({
  routes: [
    {
      path: '/',
      component: AppLayout,
      children: [
        {
          path: '', // 默认子路由
          name: 'home',
          component: () => import('../views/home/index.vue')
        },
        {
          path: 'article',
          name: 'article',
          component: () => import('../views/article/index.vue')
        }
      ]
    }
  ], // 路由规则
  history: createWebHashHistory() // 路由历史模式
})

export default router
